var formValidator = function() {
	var rules = {
		name : {
			required : true,
			maxlength : 20
		},
		price : {
			required : true,
			number : true,
			range : [ 1, 99999999 ]
		},
		storeCount : {
			required : true,
			number : true,
			range : [ 0, 99999999 ]
		},
		introduce : {
			maxlength : 250
		},
		exchangeFlow : {
			maxlength : 250
		},
		declaration : {
			maxlength : 250
		},
		activityIntroduce : {
			maxlength : 250
		}
	};

	var messages = {
		name : {
			required : "品名不能为空",
			maxlength : "品名不能超过20个字"
		}, 
		price : {
			required : "价格不能为空",
			number : "品名只能是数字",
			range : "品名只能是1到99999999之间的数字",
		}
	};

	return {
		init : function() {
			validator(rules, messages).init();
		}
	};
}();
